//
//  RickyRefreshView.h
//  Ricky_RefreshControl
//
//  Created by MR-zhang on 15/7/2.
//  Copyright (c) 2015年 Ricky. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "RickyRefreshConst.h"

typedef void(^RefreshControlBlock)();

@interface RickyRefreshView : UIView

@property (nonatomic, strong, readonly) UIScrollView *scrollView;

/** 是否添加contentOffset, contentSize, contentInset监听 */
@property (nonatomic, assign) BOOL observersEnabled;

/** 刷新控件是否弹回，留作备用. */
@property (nonatomic, assign) BOOL rebounded;

/** 完成类型 */
@property (nonatomic, assign) RickyRefreshCompleteType completeType;

/** 刷新状态 */
@property (nonatomic, assign) RickyRefreshState refreshState;

/** 下拉（上拉）比例 */
@property (nonatomic, assign) CGFloat refreshRatio;

/** 设置刷新状态，并设置刷新控件弹回后的回调block */
- (void)setRefreshState:(RickyRefreshState)refreshState withCallBack:(void(^)())action;

/** 刷新控件类型  */
@property (nonatomic, assign) RickyRefreshViewType refreshViewType;

/** 刷新控件的刷新回调block */
@property (nonatomic, copy) RefreshControlBlock actionBlock;

/** 刷新控件的初始化方法，加入刷新控件类型：header, footer */
- (id)initWithRefreshViewType:(RickyRefreshViewType)viewType;

@end
